VPATH = ../src

CC = gcc
RM = rm
VG = valgrind
DB = gdb

OBJECT = server-test.o EventObject.o EventRaw.o EventNode.o \
         EventString.o EventList.o ResponseType.o

TARGET = test

all: $(TARGET)

run: $(TARGET)
	./$(TARGET)

mem_check: $(TARGET)
	$(VG) --leak-check=full --show-leak-kinds=all ./$(TARGET)

debug: $(TARGET)
	$(DB) ./$(TARGET)

$(TARGET): $(OBJECT)
	$(CC) -o $@ $^

$(OBJECT): %.o : %.c
	$(CC) -c -o $@ $< -I. -Wall -Werror -g

.PHONY: clean
clean:
	$(RM) -v $(OBJECT) $(TARGET)